﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>迅贷网</title>
    <link rel="stylesheet" type="text/css" href="__HOME_CSS__/bootstrap.css" />
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        #layout_box {
            min-width: 320px;
            max-width: 640px;
            width: 100%;
            margin: 0 auto;
        }

        #myform {
            padding: 0 12%;
			            margin-bottom:25px;

        }

        .dked {
            display: inline-block;
            width: 78%;
            height: 45px;
        }

        .imgSe {
            margin: 0;
            width: 45px;
            height: 45px;
            position: relative;
            left: 5px;
            top: -1px;
            border: 2px solid #c2c2c2;
        }

        .imgSei {
            margin: 0;
            width: 45px;
            height: 45px;
            position: relative;
           left: 6px;
            top: -1px;
            border: 2px solid #c2c2c2;
        }

        .select_box {
            height: 45px;
            margin-bottom: 20px;
        }

        .save {
            display: inline-block;
            width: 93%;
            color: white;
            background-color: dodgerblue;
            height: 38px;
            text-align: center;
            line-height: 38px;
            border-radius: 5px;
        }
        #cptd {
            margin:0 7%;
        }
        #cptd p {
            display: inline-block;
            width: 24%;
            text-align: center;
        }

            #cptd p img {
                height: 40px;
                width: 40px;
            }
        #zc {
                position: absolute;
    top: 0;
    height: 7rem;
    text-align: center;
    font-size: 23px;
    color: white;
    width: 100%;
    padding-top: 1.2rem;

        }
    </style>
    <script type="text/javascript" async src="//yun.tuia.cn/h5-tuia/tuiac.js" ></script>
</head>

<body>
    <div id="layout_box">
        <img src="__HOME_PICTURE__/9.jpg" width="100%" height="auto" />
        <div style="position:relative">
            <img src="__HOME_PICTURE__/1s.jpg" width="100%" height="auto"/>
            <p id="zc">免费注册领取额度</p>
        </div>
        <div id="myform">
            <div class="select_box">
                <img src="__HOME_PICTURE__/1.gif" class="imgSe" />
                <select style="color:#999999" class="form-control dked select1">
                <option>请选择您的需求额度</option>
                <!--<option>50-100万</option>-->
                <option>30-50万</option>
                <option>10-30万</option>
                <option>5-10万</option>
                </select>
            </div>
            <!--<div id="" class="select_box">-->
                <!--<img src="__HOME_PICTURE__/2.gif" class="imgSe" />-->
                <!--<select style="color:#999999"  class="form-control dked select2" >-->
                <!--<option>请选择您的贷款期限</option>-->
                <!--<option>6-12个月</option>-->
                <!--<option>12-24个月</option>-->
                <!--<option>24-36个月</option>-->
                <!--<option>36个月以上</option>-->
                <!--</select>-->
            <!--</div>-->
            <div id="" class="select_box">
                <img src="__HOME_PICTURE__/3.gif" class="imgSei" />
                <input type="text" class="form-control dked name" placeholder="请输入您的姓名">
            </div>
            <div id="" class="select_box">
                <img src="__HOME_PICTURE__/4.gif" class="imgSei" />
                <input type="text" class="form-control dked tel" placeholder="请输入您的手机号">
            </div>
            <p class="save">免费申请</p>
        </div>
        <input type="hidden" id="qd" value="{$qd}">
        <img src="__HOME_PICTURE__/5.jpg" width="100%" height="auto"/>
        <img src="__HOME_PICTURE__/6.jpg" width="100%" height="auto"/>
        <img src="__HOME_PICTURE__/1.jpg" width="100%" height="auto" />
        <img src="__HOME_PICTURE__/8.jpg" width="100%" height="auto" />
        

    </div>
    <link href="__HOME_CSS__/layer.css" rel="stylesheet" />
    <script src="__HOME_JS__/jquery-3.2.1.js" type="text/javascript" charset="utf-8"></script>
    <script src="__HOME_JS__/bootstrap.js" type="text/javascript" charset="utf-8"></script>
    <script src="__HOME_JS__/layer.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".save").click(function () {
                var djke = $(".select1").find("option:selected").text();
                var tel = $(".tel").val().trim();
                var qd = $("#qd").val().trim();
                var name = $(".name").val().trim();
                if (djke == "请选择您的借款金额") {
                    layer.msg('请选择您的借款金额');
                    return false;
                }
                else if (name.length == 0) {
                    layer.msg('请输入您的姓名');
                    return false;
                }
                else if (tel.length == 0) {
                    layer.msg('请输入电话号码');
                    return false;
                }
                else if (tel.length != 11) {
                    layer.msg('请输入正确的电话号码');
                    return false;
                }
                else if (name.length == 0) {
                    layer.msg('请输入您的姓名');
                    return false;
                }
                else {
                    $.ajax({
                        type: "post",
                        url: "/application.html",
                        data: { djke: djke, mobile: tel, name: name , qd: qd},
                        dataType:"json",
                        success: function (data) {
                            if (data.code == 200) {
                                if(!!window.TuiaAdverter) { //先判断js是否引入成功
                                    TuiaAdverter.init(function () {
                                        layer.confirm('恭喜你申请成功', {
                                            btn: ['确定'] //按钮
                                        }, function () {
                                            window.location.reload();
                                        });
                                    });
                                }else{
                                    window.location.reload();
                                }
                            }else{
                                layer.alert(data.msg);
                            }
                        },
                        error: function () {
                            console.log("Ajax Request Error");
                        }
                    });
                }

            });
        });

    </script>
</body>

</html>
